package com.kitty.common.utils;

import com.kitty.game.boss.BossDataPool;
import com.kitty.game.config.MapBossPos;
import com.kitty.game.enter.Position;

import java.util.*;
import java.util.concurrent.ThreadLocalRandom;

public  class StaticParam {

    public static final int[] MAPIDS = {2000, 3000, 4000, 24000, 8000, 9000, 8100/*, 8200*/};// 刷道地图
    public static final List<Integer> notJOINTeamMAPIDS = Arrays.asList(38004,60007,27008, 25008, 25009);
    private final static List<String> guizuList = Arrays.asList("炼狱魔","阴阳师","魅灵","狱獒");
    private final static List<String> guijiangList = Arrays.asList("范无救","牛头狱卒","谢必安","马面罗刹");
    private final static List<String> guixianList = Arrays.asList("冥炎之灵","孟姑","谛听","阎摩");

    public static byte getPetTypeByName(String name){
        byte type = 0;
       if(guizuList.contains(name)){
           type = 6;
       }
        if(guijiangList.contains(name)){
            type = 7;
        }
        if(guixianList.contains(name)){
            type = 8;
        }
        return type;
    }

    public static String getPolarByNumber(short polar){
        List<String> polars = Arrays.asList("无","金","木","水","火","土");
        return polars.get(polar);
    }


    /**
     * 获得随机出现的地图ID
     */
    public static int getRandomMapId() {
        int index = ThreadLocalRandom.current().nextInt(MAPIDS.length);
        return MAPIDS[index];
    }
    /**
     * 在MapBossPos中配置的位置中随机获得1个位置
     */
    public static Position getRandomPosition(MapBossPos mapBossPos) {
        if (mapBossPos == null || mapBossPos.getList() == null || mapBossPos.getList().isEmpty()) {
            return null;
        }
        int index = ThreadLocalRandom.current().nextInt(mapBossPos.getList().size());
        return mapBossPos.getList().get(index);
    }
    /**
     * 根据mapId获得MapBossPos产品数据
     */
    public static MapBossPos getMapBossPos(int mapId) {
        return BossDataPool.mapBossPosMap.get(mapId);
    }

    /**
     * 获取唯一UUID
     */
    public static String  getUUID(){
        return UUID.randomUUID().toString().replaceAll("-", "");
    }

    public static void main(String[] args) {
        int a = 46541;
        System.out.println( a * (250D/100));
        int b = (int)(a * (250D/100));
        System.out.println(b);
        //System.out.println(notJOINTeamMAPIDS.contains(38004));


    }


}
